<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>Wysiwyg &amp; Markdown Editor - Ace Admin</title>

		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<!--basic styles-->

		<link href="assets/css/bootstrap.min.css" rel="stylesheet" />
		<link href="assets/css/bootstrap-responsive.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="assets/css/font-awesome.min.css" />

		<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!--page specific plugin styles-->

		<!--fonts-->

		<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />

		<!--ace styles-->

		<link rel="stylesheet" href="assets/css/ace.min.css" />
		<link rel="stylesheet" href="assets/css/ace-responsive.min.css" />
		<link rel="stylesheet" href="assets/css/ace-skins.min.css" />

		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->

		<!--inline styles if any-->
	</head>

	<body>
		<div class="navbar navbar-inverse">
			<div class="navbar-inner">
				<div class="container-fluid">
					<a href="#" class="brand">
						<small>
							<i class="icon-leaf"></i>
							Ace Admin
						</small>
					</a><!--/.brand-->

					<ul class="nav ace-nav pull-right">
						<li class="grey">
							<a data-toggle="dropdown" class="dropdown-toggle" href="#">
								<i class="icon-tasks"></i>
								<span class="badge badge-grey">4</span>
							</a>

							<ul class="pull-right dropdown-navbar dropdown-menu dropdown-caret dropdown-closer">
								<li class="nav-header">
									<i class="icon-ok"></i>
									4 Tasks to complete
								</li>

								<li>
									<a href="#">
										<div class="clearfix">
											<span class="pull-left">Software Update</span>
											<span class="pull-right">65%</span>
										</div>

										<div class="progress progress-mini ">
											<div style="width:65%" class="bar"></div>
										</div>
									</a>
								</li>

								<li>
									<a href="#">
										<div class="clearfix">
											<span class="pull-left">Hardware Upgrade</span>
											<span class="pull-right">35%</span>
										</div>

										<div class="progress progress-mini progress-danger">
											<div style="width:35%" class="bar"></div>
										</div>
									</a>
								</li>

								<li>
									<a href="#">
										<div class="clearfix">
											<span class="pull-left">Unit Testing</span>
											<span class="pull-right">15%</span>
										</div>

										<div class="progress progress-mini progress-warning">
											<div style="width:15%" class="bar"></div>
										</div>
									</a>
								</li>

								<li>
									<a href="#">
										<div class="clearfix">
											<span class="pull-left">Bug Fixes</span>
											<span class="pull-right">90%</span>
										</div>

										<div class="progress progress-mini progress-success progress-striped active">
											<div style="width:90%" class="bar"></div>
										</div>
									</a>
								</li>

								<li>
									<a href="#">
										See tasks with details
										<i class="icon-arrow-right"></i>
									</a>
								</li>
							</ul>
						</li>

						<li class="purple">
							<a data-toggle="dropdown" class="dropdown-toggle" href="#">
								<i class="icon-bell-alt icon-only icon-animated-bell"></i>
								<span class="badge badge-important">8</span>
							</a>

							<ul class="pull-right dropdown-navbar navbar-pink dropdown-menu dropdown-caret dropdown-closer">
								<li class="nav-header">
									<i class="icon-warning-sign"></i>
									8 Notifications
								</li>

								<li>
									<a href="#">
										<div class="clearfix">
											<span class="pull-left">
												<i class="btn btn-mini no-hover btn-pink icon-comment"></i>
												New Comments
											</span>
											<span class="pull-right badge badge-info">+12</span>
										</div>
									</a>
								</li>

								<li>
									<a href="#">
										<i class="btn btn-mini btn-primary icon-user"></i>
										Bob just signed up as an editor ...
									</a>
								</li>

								<li>
									<a href="#">
										<div class="clearfix">
											<span class="pull-left">
												<i class="btn btn-mini no-hover btn-success icon-shopping-cart"></i>
												New Orders
											</span>
											<span class="pull-right badge badge-success">+8</span>
										</div>
									</a>
								</li>

								<li>
									<a href="#">
										<div class="clearfix">
											<span class="pull-left">
												<i class="btn btn-mini no-hover btn-info icon-twitter"></i>
												Followers
											</span>
											<span class="pull-right badge badge-info">+11</span>
										</div>
									</a>
								</li>

								<li>
									<a href="#">
										See all notifications
										<i class="icon-arrow-right"></i>
									</a>
								</li>
							</ul>
						</li>

						<li class="green">
							<a data-toggle="dropdown" class="dropdown-toggle" href="#">
								<i class="icon-envelope-alt icon-only icon-animated-vertical"></i>
								<span class="badge badge-success">5</span>
							</a>

							<ul class="pull-right dropdown-navbar dropdown-menu dropdown-caret dropdown-closer">
								<li class="nav-header">
									<i class="icon-envelope"></i>
									5 Messages
								</li>

								<li>
									<a href="#">
										<img src="assets/avatars/avatar.png" class="msg-photo" alt="Alex's Avatar" />
										<span class="msg-body">
											<span class="msg-title">
												<span class="blue">Alex:</span>
												Ciao sociis natoque penatibus et auctor ...
											</span>

											<span class="msg-time">
												<i class="icon-time"></i>
												<span>a moment ago</span>
											</span>
										</span>
									</a>
								</li>

								<li>
									<a href="#">
										<img src="assets/avatars/avatar3.png" class="msg-photo" alt="Susan's Avatar" />
										<span class="msg-body">
											<span class="msg-title">
												<span class="blue">Susan:</span>
												Vestibulum id ligula porta felis euismod ...
											</span>

											<span class="msg-time">
												<i class="icon-time"></i>
												<span>20 minutes ago</span>
											</span>
										</span>
									</a>
								</li>

								<li>
									<a href="#">
										<img src="assets/avatars/avatar4.png" class="msg-photo" alt="Bob's Avatar" />
										<span class="msg-body">
											<span class="msg-title">
												<span class="blue">Bob:</span>
												Nullam quis risus eget urna mollis ornare ...
											</span>

											<span class="msg-time">
												<i class="icon-time"></i>
												<span>3:15 pm</span>
											</span>
										</span>
									</a>
								</li>

								<li>
									<a href="#">
										See all messages
										<i class="icon-arrow-right"></i>
									</a>
								</li>
							</ul>
						</li>

						<li class="light-blue user-profile">
							<a data-toggle="dropdown" href="#" class="user-menu dropdown-toggle">
								<img class="nav-user-photo" src="assets/avatars/user.jpg" alt="Jason's Photo" />
								<span id="user_info">
									<small>Welcome,</small>
									Jason
								</span>

								<i class="icon-caret-down"></i>
							</a>

							<ul class="pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-closer" id="user_menu">
								<li>
									<a href="#">
										<i class="icon-cog"></i>
										Settings
									</a>
								</li>

								<li>
									<a href="#">
										<i class="icon-user"></i>
										Profile
									</a>
								</li>

								<li class="divider"></li>

								<li>
									<a href="#">
										<i class="icon-off"></i>
										Logout
									</a>
								</li>
							</ul>
						</li>
					</ul><!--/.ace-nav-->
				</div><!--/.container-fluid-->
			</div><!--/.navbar-inner-->
		</div>

		<div class="container-fluid" id="main-container">
			<a id="menu-toggler" href="#">
				<span></span>
			</a>

			<div id="sidebar">
				<div id="sidebar-shortcuts">
					<div id="sidebar-shortcuts-large">
						<button class="btn btn-small btn-success">
							<i class="icon-signal"></i>
						</button>

						<button class="btn btn-small btn-info">
							<i class="icon-pencil"></i>
						</button>

						<button class="btn btn-small btn-warning">
							<i class="icon-group"></i>
						</button>

						<button class="btn btn-small btn-danger">
							<i class="icon-cogs"></i>
						</button>
					</div>

					<div id="sidebar-shortcuts-mini">
						<span class="btn btn-success"></span>

						<span class="btn btn-info"></span>

						<span class="btn btn-warning"></span>

						<span class="btn btn-danger"></span>
					</div>
				</div><!--#sidebar-shortcuts-->

				<ul class="nav nav-list">
					<li>
						<a href="index.html">
							<i class="icon-dashboard"></i>
							<span>Dashboard</span>
						</a>
					</li>

					<li>
						<a href="typography.html">
							<i class="icon-text-width"></i>
							<span>Typography</span>
						</a>
					</li>

					<li>
						<a href="#" class="dropdown-toggle">
							<i class="icon-desktop"></i>
							<span>UI Elements</span>

							<b class="arrow icon-angle-down"></b>
						</a>

						<ul class="submenu">
							<li>
								<a href="elements.html">
									<i class="icon-double-angle-right"></i>
									Elements
								</a>
							</li>

							<li>
								<a href="buttons.html">
									<i class="icon-double-angle-right"></i>
									Buttons &amp; Icons
								</a>
							</li>

							<li>
								<a href="treeview.html">
									<i class="icon-double-angle-right"></i>
									Treeview
								</a>
							</li>
						</ul>
					</li>

					<li>
						<a href="tables.html">
							<i class="icon-list"></i>
							<span>Tables</span>
						</a>
					</li>

					<li class="active open">
						<a href="#" class="dropdown-toggle">
							<i class="icon-edit"></i>
							<span>Forms</span>

							<b class="arrow icon-angle-down"></b>
						</a>

						<ul class="submenu">
							<li>
								<a href="form-elements.html">
									<i class="icon-double-angle-right"></i>
									Form Elements
								</a>
							</li>

							<li>
								<a href="form-wizard.html">
									<i class="icon-double-angle-right"></i>
									Wizard &amp; Validation
								</a>
							</li>

							<li class="active">
								<a href="wysiwyg.html">
									<i class="icon-double-angle-right"></i>
									Wysiwyg &amp; Markdown
								</a>
							</li>
						</ul>
					</li>

					<li>
						<a href="widgets.html">
							<i class="icon-list-alt"></i>
							<span>Widgets</span>
						</a>
					</li>

					<li>
						<a href="calendar.html">
							<i class="icon-calendar"></i>
							<span>Calendar</span>
						</a>
					</li>

					<li>
						<a href="gallery.html">
							<i class="icon-picture"></i>
							<span>Gallery</span>
						</a>
					</li>

					<li>
						<a href="grid.html">
							<i class="icon-th"></i>
							<span>Grid</span>
						</a>
					</li>

					<li>
						<a href="#" class="dropdown-toggle">
							<i class="icon-file"></i>
							<span>Other Pages</span>

							<b class="arrow icon-angle-down"></b>
						</a>

						<ul class="submenu">
							<li>
								<a href="pricing.html">
									<i class="icon-double-angle-right"></i>
									Pricing Tables
								</a>
							</li>

							<li>
								<a href="invoice.html">
									<i class="icon-double-angle-right"></i>
									Invoice
								</a>
							</li>

							<li>
								<a href="login.html">
									<i class="icon-double-angle-right"></i>
									Login &amp; Register
								</a>
							</li>

							<li>
								<a href="error-404.html">
									<i class="icon-double-angle-right"></i>
									Error 404
								</a>
							</li>

							<li>
								<a href="error-500.html">
									<i class="icon-double-angle-right"></i>
									Error 500
								</a>
							</li>

							<li>
								<a href="blank.html">
									<i class="icon-double-angle-right"></i>
									Blank Page
								</a>
							</li>
						</ul>
					</li>
				</ul><!--/.nav-list-->

				<div id="sidebar-collapse">
					<i class="icon-double-angle-left"></i>
				</div>
			</div>

			<div id="main-content" class="clearfix">
				<div id="breadcrumbs">
					<ul class="breadcrumb">
						<li>
							<i class="icon-home"></i>
							<a href="#">Home</a>

							<span class="divider">
								<i class="icon-angle-right"></i>
							</span>
						</li>

						<li>
							<a href="#">Forms</a>

							<span class="divider">
								<i class="icon-angle-right"></i>
							</span>
						</li>
						<li class="active">Wysiwyg &amp; Markdown</li>
					</ul><!--.breadcrumb-->

					<div id="nav-search">
						<form class="form-search">
							<span class="input-icon">
								<input type="text" placeholder="Search ..." class="input-small search-query" id="nav-search-input" autocomplete="off" />
								<i class="icon-search" id="nav-search-icon"></i>
							</span>
						</form>
					</div><!--#nav-search-->
				</div>

				<div id="page-content" class="clearfix">
					<div class="page-header position-relative">
						<h1>Wysiwyg &amp; Markdown Editor </h1>
					</div><!--/.page-header-->

					<div class="row-fluid">
						<!--PAGE CONTENT BEGINS HERE-->

						<h4 class="header green clearfix">
							Bootstrap Lightweight Editor
							<div class="pull-right">
								<small class="grey middle">Choose style: &nbsp;</small>

								<div class="btn-toolbar inline middle no-margin">
									<div data-toggle="buttons-radio" class="btn-group no-margin">
										<button class="btn btn-mini btn-yellow">1</button>
										<button class="btn btn-mini btn-yellow active">2</button>
										<button class="btn btn-mini btn-yellow">3</button>
									</div>
								</div>
							</div>
						</h4>

						<div id="editor-toolbar-1" class="wysiwyg-toolbar wysiwyg-style2 btn-toolbar center" data-target="#editor">
							<div class="btn-group">
								<a class="btn btn-small  dropdown-toggle" data-toggle="dropdown" title="Font">
									<i class=" icon-font"></i>

									<i class="icon-angle-down icon-on-right"></i>
								</a>
								<ul class="dropdown-menu dropdown-light">  </ul>
							</div>

							<div class="btn-group">
								<a class="btn btn-small  dropdown-toggle" data-toggle="dropdown" title="Font Size">
									<i class=" icon-text-height"></i>

									&nbsp;
									<i class="icon-angle-down icon-on-right"></i>
								</a>

								<ul class="dropdown-menu dropdown-light">
									<li>
										<a data-edit="fontSize 5">
											<font size="5">Huge</font>
										</a>
									</li>

									<li>
										<a data-edit="fontSize 3">
											<font size="3">Normal</font>
										</a>
									</li>

									<li>
										<a data-edit="fontSize 1">
											<font size="1">Small</font>
										</a>
									</li>
								</ul>
							</div>

							<div class="btn-group">
								<a class="btn btn-small btn-info " data-edit="bold" title="Bold (Ctrl/Cmd+B)">
									<i class=" icon-bold"></i>
								</a>

								<a class="btn btn-small btn-info " data-edit="italic" title="Italic (Ctrl/Cmd+I)">
									<i class=" icon-italic"></i>
								</a>

								<a class="btn btn-small btn-info " data-edit="strikethrough" title="Strikethrough">
									<i class=" icon-strikethrough"></i>
								</a>

								<a class="btn btn-small btn-info " data-edit="underline" title="Underline (Ctrl/Cmd+U)">
									<i class=" icon-underline"></i>
								</a>
							</div>

							<div class="btn-group">
								<a class="btn btn-small btn-success " data-edit="insertunorderedlist" title="Bullet list">
									<i class=" icon-list-ul"></i>
								</a>

								<a class="btn btn-small btn-success " data-edit="insertorderedlist" title="Number list">
									<i class=" icon-list-ol"></i>
								</a>

								<a class="btn btn-small btn-purple " data-edit="outdent" title="Reduce indent (Shift+Tab)">
									<i class=" icon-indent-left"></i>
								</a>

								<a class="btn btn-small btn-purple " data-edit="indent" title="Indent (Tab)">
									<i class=" icon-indent-right"></i>
								</a>
							</div>

							<div class="btn-group">
								<a class="btn btn-small btn-primary " data-edit="justifyleft" title="Align Left (Ctrl/Cmd+L)">
									<i class=" icon-align-left"></i>
								</a>

								<a class="btn btn-small btn-primary " data-edit="justifycenter" title="Center (Ctrl/Cmd+E)">
									<i class=" icon-align-center"></i>
								</a>

								<a class="btn btn-small btn-primary " data-edit="justifyright" title="Align Right (Ctrl/Cmd+R)">
									<i class=" icon-align-right"></i>
								</a>

								<a class="btn btn-small btn-inverse " data-edit="justifyfull" title="Justify (Ctrl/Cmd+J)">
									<i class=" icon-align-justify"></i>
								</a>
							</div>

							<div class="btn-group">
								<a class="btn btn-small btn-pink dropdown-toggle" data-toggle="dropdown" title="Hyperlink">
									<i class=" icon-link"></i>
								</a>

								<div class="dropdown-menu dropdown-caret input-append pull-right">
									<input placeholder="URL" type="text" data-edit="createLink" />
									<button class="btn btn-small btn-primary" type="button">Add</button>
								</div>

								<a class="btn btn-small btn-pink " data-edit="unlink" title="Remove Hyperlink">
									<i class=" icon-unlink"></i>
								</a>
							</div>

							<div class="btn-group">
								<a class="btn btn-small btn-success" title="Insert picture (or just drag & drop)" id="pictureBtn">
									<i class=" icon-picture"></i>
								</a>

								<input type="file" data-role="magic-overlay" data-target="#pictureBtn" data-edit="insertImage" />
							</div>

							<div class="btn-group">
								<select id="colorpicker" class="hidden" title="Change Color">
									<option value="#ac725e">#ac725e</option>
									<option value="#d06b64">#d06b64</option>
									<option value="#f83a22">#f83a22</option>
									<option value="#fa573c">#fa573c</option>
									<option value="#ff7537">#ff7537</option>
									<option value="#ffad46">#ffad46</option>
									<option value="#42d692">#42d692</option>
									<option value="#16a765">#16a765</option>
									<option value="#7bd148">#7bd148</option>
									<option value="#b3dc6c">#b3dc6c</option>
									<option value="#fbe983">#fbe983</option>
									<option value="#fad165">#fad165</option>
									<option value="#92e1c0">#92e1c0</option>
									<option value="#9fe1e7">#9fe1e7</option>
									<option value="#9fc6e7">#9fc6e7</option>
									<option value="#4986e7">#4986e7</option>
									<option value="#9a9cff">#9a9cff</option>
									<option value="#b99aff">#b99aff</option>
									<option value="#c2c2c2">#c2c2c2</option>
									<option value="#cabdbf">#cabdbf</option>
									<option value="#cca6ac">#cca6ac</option>
									<option value="#f691b2">#f691b2</option>
									<option value="#cd74e6">#cd74e6</option>
									<option value="#a47ae2">#a47ae2</option>
									<option value="#444" selected="">#444</option>
								</select>

								<input style="display:none;" disabled="" class="hidden" type="text" data-edit="foreColor" />
							</div>

							<div class="btn-group">
								<a class="btn btn-small btn-grey " data-edit="undo" title="Undo (Ctrl/Cmd+Z)">
									<i class=" icon-undo"></i>
								</a>

								<a class="btn btn-small btn-grey " data-edit="redo" title="Redo (Ctrl/Cmd+Y)">
									<i class=" icon-repeat"></i>
								</a>
							</div>

							<input type="text" data-edit="inserttext" class="wysiwyg-speech-input" id="voiceBtn" x-webkit-speech="" />
						</div>

						<div class="wysiwyg-editor" id="editor1"></div>

						<div class="hr hr-double dotted"></div>

						<div class="row-fluid">
							<div class="span6">
								<h4 class="header blue">Inside Widget</h4>

								<div class="widget-box">
									<div class="widget-header widget-header-small  header-color-green">
										<div id="editor-toolbar-2" class="btn-toolbar wysiwyg-toolbar">
											<div class="btn-group">
												<a class="btn btn-small btn-grey " data-edit="bold" title="Bold (Ctrl/Cmd+B)">
													<i class=" icon-bold"></i>
												</a>

												<a class="btn btn-small btn-grey " data-edit="italic" title="Italic (Ctrl/Cmd+I)">
													<i class=" icon-italic"></i>
												</a>

												<a class="btn btn-small btn-grey " data-edit="strikethrough" title="Strikethrough">
													<i class=" icon-strikethrough"></i>
												</a>

												<a class="btn btn-small btn-grey " data-edit="underline" title="Underline (Ctrl/Cmd+U)">
													<i class=" icon-underline"></i>
												</a>
											</div>

											<div class="btn-group">
												<a class="btn btn-small btn-grey " data-edit="insertunorderedlist" title="Bullet list">
													<i class=" icon-list-ul"></i>
												</a>

												<a class="btn btn-small btn-grey " data-edit="insertorderedlist" title="Number list">
													<i class=" icon-list-ol"></i>
												</a>
											</div>

											<div class="btn-group">
												<a class="btn btn-small btn-grey " data-edit="justifyleft" title="Align Left (Ctrl/Cmd+L)">
													<i class=" icon-align-left"></i>
												</a>

												<a class="btn btn-small btn-grey " data-edit="justifycenter" title="Center (Ctrl/Cmd+E)">
													<i class=" icon-align-center"></i>
												</a>

												<a class="btn btn-small btn-grey " data-edit="justifyright" title="Align Right (Ctrl/Cmd+R)">
													<i class=" icon-align-right"></i>
												</a>
											</div>
										</div>

										<div class="widget-toolbar">
											<a href="#" data-action="collapse">
												<i class="icon-chevron-up"></i>
											</a>
										</div>
									</div>

									<div class="widget-body">
										<div class="widget-main no-padding">
											<div class="wysiwyg-editor" id="editor2" style="height:200px;"></div>
										</div>

										<div class="widget-toolbox padding-4 clearfix">
											<div class="btn-group pull-left">
												<button class="btn btn-small btn-grey">
													<i class="icon-remove bigger-125"></i>
													Cancel
												</button>
											</div>

											<div class="btn-group pull-right">
												<button class="btn btn-small btn-danger">
													<i class="icon-save bigger-125"></i>
													Save
												</button>

												<button class="btn btn-small btn-success">
													<i class="icon-globe bigger-125"></i>

													Publish
													<i class="icon-arrow-right icon-on-right bigger-125"></i>
												</button>
											</div>
										</div>
									</div>
								</div>
							</div>

							<div class="span6">
								<h4 class="header green">Markdown Editor</h4>

								<div class="widget-box">
									<div class="widget-header widget-header-small header-color-blue">  </div>

									<div class="widget-body">
										<div class="widget-main no-padding">
											<textarea class="span12" name="content" data-provide="markdown" rows="10">**Markdown Editor** inside a *widget box*

- list item 1
- list item 2
- list item 3</textarea>
										</div>

										<div class="widget-toolbox padding-4 clearfix">
											<div class="btn-group pull-left">
												<button class="btn btn-small btn-info">
													<i class="icon-remove bigger-125"></i>
													Cancel
												</button>
											</div>

											<div class="btn-group pull-right">
												<button class="btn btn-small btn-purple">
													<i class="icon-save bigger-125"></i>
													Save
												</button>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>

						<!--PAGE CONTENT ENDS HERE-->
					</div><!--/row-->
				</div><!--/#page-content-->

				<div id="ace-settings-container">
					<div class="btn btn-app btn-mini btn-warning" id="ace-settings-btn">
						<i class="icon-cog"></i>
					</div>

					<div id="ace-settings-box">
						<div>
							<div class="pull-left">
								<select id="skin-colorpicker" class="hidden">
									<option data-class="default" value="#438EB9">#438EB9</option>
									<option data-class="skin-1" value="#222A2D">#222A2D</option>
									<option data-class="skin-2" value="#C6487E">#C6487E</option>
									<option data-class="skin-3" value="#D0D0D0">#D0D0D0</option>
								</select>
							</div>
							<span>&nbsp; Choose Skin</span>
						</div>

						<div>
							<input type="checkbox" class="ace-checkbox-2" id="ace-settings-header" />
							<label class="lbl" for="ace-settings-header"> Fixed Header</label>
						</div>

						<div>
							<input type="checkbox" class="ace-checkbox-2" id="ace-settings-sidebar" />
							<label class="lbl" for="ace-settings-sidebar"> Fixed Sidebar</label>
						</div>
					</div>
				</div><!--/#ace-settings-container-->
			</div><!--/#main-content-->
		</div><!--/.fluid-container#main-container-->

		<a href="#" id="btn-scroll-up" class="btn btn-small btn-inverse">
			<i class="icon-double-angle-up icon-only bigger-110"></i>
		</a>

		<!--basic scripts-->

		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
		<script type="text/javascript">
			window.jQuery || document.write("<script src='assets/js/jquery-1.9.1.min.js'>"+"<"+"/script>");
		</script>
		<script src="assets/js/bootstrap.min.js"></script>

		<!--page specific plugin scripts-->

		<script src="assets/js/markdown/markdown.min.js"></script>
		<script src="assets/js/markdown/bootstrap-markdown.min.js"></script>
		<script src="assets/js/jquery.hotkeys.min.js"></script>
		<script src="assets/js/bootstrap-wysiwyg.min.js"></script>
		<script src="assets/js/bootbox.min.js"></script>

		<!--ace scripts-->

		<script src="assets/js/ace-elements.min.js"></script>
		<script src="assets/js/ace.min.js"></script>

		<!--inline scripts related to this page-->

		<script type="text/javascript">
			$(function(){
    function initToolbarBootstrapBindings() {
      var fonts = ['Arial', 'Courier', 'Comic Sans MS', 'Helvetica', 'Open Sans', 'Tahoma', 'Verdana'],
            fontTarget = $('[title=Font]').siblings('.dropdown-menu');
      $.each(fonts, function (idx, fontName) {
          fontTarget.append($('<li><a data-edit="fontName ' + fontName +'" style="font-family:\''+ fontName +'\'">'+fontName + '</a></li>'));
      });
      $('a[title]').tooltip({container:'body',animation:false});
    	$('.dropdown-menu input').click(function() {return false;})
		    .change(function () {$(this).parent('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle');})
        .keydown('esc', function () {this.value='';$(this).change();});


      $('.wysiwyg-toolbar input[type=file]').prev().on('click', function () { 
        $(this).next().click();//the image icon
      });

	  $('#colorpicker').ace_colorpicker({pull_right:true,caret:false}).change(function(){
		$(this).nextAll('input').eq(0).val(this.value).change();
	  }).next().tooltip({title: $('#colorpicker').attr('title'), container:'body',animation:false}).next().hide();


      if ("onwebkitspeechchange"  in document.createElement("input")) {
        var editorOffset = $('#editor1').offset();
        $('#voiceBtn').css('position','absolute').offset({top: editorOffset.top, left: editorOffset.left+$('#editor1').innerWidth()-35});
      } else {
        $('#voiceBtn').hide();
      }
	};
	function showErrorAlert (reason, detail) {
		var msg='';
		if (reason==='unsupported-file-type') { msg = "Unsupported format " +detail; }
		else {
			console.log("error uploading file", reason, detail);
		}
		$('<div class="alert"> <button type="button" class="close" data-dismiss="alert">&times;</button>'+ 
		 '<strong>File upload error</strong> '+msg+' </div>').prependTo('#alerts');
	};
    initToolbarBootstrapBindings();  
	$('#editor1').wysiwyg( { fileUploadError: showErrorAlert , activeToolbarClass: 'active' , toolbarSelector : '#editor-toolbar-1'} );
	$('#editor2').wysiwyg( { fileUploadError: showErrorAlert , activeToolbarClass: 'active' , toolbarSelector : '#editor-toolbar-2' } );

	
	
	$('[data-toggle="buttons-radio"]').on('click', function(e){
		var target = $(e.target);
		var which = parseInt(target.html());
		var toolbar = $('#editor-toolbar-1').get(0);
		if(which == 1 || which == 2 || which == 3) {
			toolbar.className = toolbar.className.replace(/wysiwyg\-style(1|2)/g , '');
			if(which == 1) $(toolbar).addClass('wysiwyg-style1');
			else if(which == 2) $(toolbar).addClass('wysiwyg-style2');
		}
	});
});
		</script>
	</body>
</html>
